package com.loveling.servlet;

/**
 * Created with IntelliJ IDEA.
 * User: liangjiefa
 * Date: 2017/6/4 0:05
 * To change this template use File | Settings | File Templates.
 */

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

/**
 * 使用@WebListener注解，实现ServletContextListener接口
 *
 */
@WebListener
public class MyServletContextListener implements ServletContextListener{
    @Override
    public void contextInitialized(ServletContextEvent servletContextEvent) {
        System.out.println("================ServletContex初始化================");
    }

    @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {
        System.out.println("================ServletContex销毁================");
    }
}
